import request from '@/utils/request'

// 查询费用账单列表
export function listDetail(query) {
  return request({
    url: '/ledger/detail/list',
    method: 'get',
    params: query
  })
}

// 查询费用账单列表
export function customerList(query) {
  return request({
    url: '/ledger/detail/customerList',
    method: 'get',
    params: query
  })
}

// 查询费用账单列表
export function orderFeeList(id) {
  return request({
    url: '/ledger/detail/getOrderFeeList/' + id,
    method: 'get'
  })
}

// 查询费用账单列表
export function shipmentFeeList(id) {
  return request({
    url: '/ledger/detail/getShipmentFeeList/' + id,
    method: 'get'
  })
}

// 查询费用账单详细
export function getDetail(id) {
  return request({
    url: '/ledger/detail/' + id,
    method: 'get'
  })
}

// 新增费用账单
export function addDetail(data) {
  return request({
    url: '/ledger/detail',
    method: 'post',
    data: data
  })
}

// 修改费用账单
export function updateDetail(data) {
  return request({
    url: '/ledger/detail',
    method: 'put',
    data: data
  })
}

// 删除费用账单
export function delDetail(id) {
  return request({
    url: '/ledger/detail/' + id,
    method: 'delete'
  })
}
// 删除费用账单
export function confirm(id) {
  return request({
    url: '/ledger/detail/affirmOrder/' + id,
    method: 'post'
  })
}

export function unconfirmed(id) {
  return request({
    url: '/ledger/detail/unconfirmed/' + id,
    method: 'post'
  })
}
